<?php

namespace common\models\db\tables;

use Yii;

/**
 * This is the model class for table "{{%config_platform_for_company}}".
 *
 * @property int $id
 * @property int $third_party_platform_id 第三方平台ID
 * @property string $company_name 公司名
 * @property string|null $fzt_version 分账通平台版本
 * @property string|null $fzt_base_uri 分账通接口基础链接
 * @property string|null $fzt_company_secret_key 分账通对接的公司私钥
 * @property string|null $fzt_public_key 分账通公钥
 * @property string|null $fzt_plat_no 分账通平台编号
 * @property int $created_at
 * @property int $updated_at
 * @property int|null $deleted_at
 * @property int|null $created_by
 * @property int|null $updated_by
 * @property int|null $deleted_by
 * @property int $status
 */
class ConfigPlatformForCompany extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%config_platform_for_company}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['third_party_platform_id', 'company_name', 'fzt_version', 'fzt_base_uri', 'fzt_company_secret_key', 'fzt_public_key', 'fzt_plat_no', 'created_at', 'updated_at', 'deleted_at', 'created_by', 'updated_by', 'deleted_by', 'status'], 'trim'],
            [['third_party_platform_id', 'company_name', 'created_at', 'updated_at'], 'required'],
            [['third_party_platform_id', 'created_at', 'updated_at', 'deleted_at', 'created_by', 'updated_by', 'deleted_by', 'status'], 'integer'],
            [['fzt_company_secret_key', 'fzt_public_key'], 'string'],
            [['company_name', 'fzt_base_uri'], 'string', 'max' => 180],
            [['fzt_version'], 'string', 'max' => 20],
            [['fzt_plat_no'], 'string', 'max' => 50],
            [['fzt_version', 'fzt_base_uri', 'fzt_company_secret_key', 'fzt_public_key', 'fzt_plat_no', 'deleted_at', 'created_by', 'updated_by', 'deleted_by'], 'default', 'value' => null],
            [['status'], 'default', 'value' => 10],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'third_party_platform_id' => Yii::t('app', '第三方平台ID'),
            'company_name' => Yii::t('app', '公司名'),
            'fzt_version' => Yii::t('app', '分账通平台版本'),
            'fzt_base_uri' => Yii::t('app', '分账通接口基础链接'),
            'fzt_company_secret_key' => Yii::t('app', '分账通对接的公司私钥'),
            'fzt_public_key' => Yii::t('app', '分账通公钥'),
            'fzt_plat_no' => Yii::t('app', '分账通平台编号'),
            'created_at' => Yii::t('app', 'Created At'),
            'updated_at' => Yii::t('app', 'Updated At'),
            'deleted_at' => Yii::t('app', 'Deleted At'),
            'created_by' => Yii::t('app', 'Created By'),
            'updated_by' => Yii::t('app', 'Updated By'),
            'deleted_by' => Yii::t('app', 'Deleted By'),
            'status' => Yii::t('app', 'Status'),
        ];
    }
}
